package com.soecode.wxtools.bean;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
public class WxQrcode {
    private int expire_seconds;
    private String action_name;
    private WxQrActionInfo action_info;

    public String toJson() {
        return JSONObject.toJSONString(this);
    }

    @Data
    @AllArgsConstructor
    public static class WxQrActionInfo {
        private WxScene scene;

        @Data
        public static class WxScene {
            private int scene_id;
            private String scene_str;

            public WxScene(int scene_id) {
                this.scene_id = scene_id;
            }

            public WxScene(String scene_str) {
                this.scene_str = scene_str;
            }
        }
    }
}
